RAIS  3.2
C:/Projekte/RAIS/UI Common/AccessManagement.cs
Go to the documentation of this file.
00001 
00027 using System;
00028 using System.Data;
00029 using System.Configuration;
00030 using System.Collections;
00031 
00032 using RAIS.Common.UserManagement;
00033 
00034 namespace RAIS.UI.Common
00035 {
00039     public class AccessManagement
00040     {
00046         public static void SignOut(System.Web.UI.Page page)
00047         {
00048             UserData currentUser = (UserData)page.Session[UI.Common.Constants.CURRENT_USER_TAG];
00049             page.Session[RAIS.UI.Common.Constants.LAST_USER_TAG] = currentUser;
00050 
00051             ApplicationLogicLayer.UserManagement.LogoutUser(currentUser, true);
00052 
00053             page.Session[RAIS.UI.Common.Constants.CURRENT_USER_TAG] = null;
00054             Localisation.CleanTranslations(page.Session);
00055 
00056             page.Session[UI.Common.Constants.SITE_MAP_EXPANSION_STATES] = null;
00057 
00058             page.Session.Clear();
00059             System.Web.Security.FormsAuthentication.SignOut();
00060 
00061             page.Response.Redirect(RAIS.UI.Common.Constants.LOGIN_PAGE);
00062         }
00066         public static void RedirectToHome(System.Web.UI.Page page)
00067         {
00068             page.Response.Redirect(RAIS.UI.Common.Constants.AUTHORIZED_HOME_PAGE);
00069         }
00070     }
00071 }